.container {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: #f5f5f5;
}

/* 左侧面板样式 */
.left-panel {
  flex: 1;
  display: flex;
  // flex-direction: column;
  padding: 20px;
  overflow: hidden;
  gap: 20px;
}

/* 上传区域样式 */
.upload-area {
  // flex: 1;
  width: 84%;
  padding: 16px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.upload-tip {
  margin-top: 8px;
  font-size: 12px;
  color: #666;
  line-height: 1.5;
}

/* 测量区域样式 */
.measure-container {
  flex: 1;
  background: #fff;
  border-radius: 6px;
  padding: 20px;
  overflow: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 测量容器 - 核心：修改鼠标样式为十字准星 */
.measure-wrapper {
  position: relative;
  display: inline-block;
  margin: 0 auto;
  // padding: 10px;
  background: #fafafa;
  border-radius: 4px;
  cursor: crosshair;
  /* 基础十字光标 */
}

/* 鼠标十字准星（视觉增强） */
.mouse-crosshair {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
  /* 不干扰点击 */
  z-index: 5;
  /* 显示在图片上方，线段下方 */
  transform: translate(-50%, -50%);
  /* 中心点对准鼠标 */
}

/* 十字准星线条 */
.mouse-crosshair::before,
.mouse-crosshair::after {
  content: '';
  position: absolute;
  background-color: #f5222d;
  /* 红色准星，高可见度 */
}

/* 水平线 */
.mouse-crosshair::before {
  width: 100%;
  height: 1px;
  top: 50%;
  left: 0;
}

/* 垂直线 */
.mouse-crosshair::after {
  width: 1px;
  height: 100%;
  top: 0;
  left: 50%;
}


// .measure-image {
//   max-width: 100%;
//   max-height: calc(100vh - 200px);
//   display: block;
//   border: 1px solid #eee;
//   border-radius: 4px;
// }

/* 无图片提示 */
.no-image-hint {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #999;
  padding: 20px;
  text-align: center;
}

.hint-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: #ccc;
}

/* 实时距离提示 */
.temp-distance {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-size: 13px;
  color: #333;
  z-index: 10;
}

/* 绘制层样式 */
.drawing-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* 线段样式 */
.segment-line {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  z-index: 1;
}

.temp-segment-line {
  position: absolute;
  height: 1px;
  transform-origin: left center;
  z-index: 1;
  background-image: linear-gradient(to right, currentColor 50%, transparent 50%);
  background-size: 6px 1px;
  background-repeat: repeat-x;
}

/* 点标记优化：增强视觉聚焦 */
.point-marker {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  // box-shadow: 0 0 0 2px white;
  /* 白色边框增强对比 */
  // border: 1px solid #333;
  /* 深色内边，提升边缘清晰度 */

  .x-xy {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .x-x {
    width: 100%;
    height: 1px;
    background-color: #1890ff;

  }

  .x-y {
    width: 1px;
    height: 100%;
    background-color: #1890ff;
  }
}

/* 点标签样式 */
.point-label {
  position: absolute;
  font-size: 12px;
  color: #333;
  white-space: nowrap;
  z-index: 3;
  background: rgba(255, 255, 255, 0.9);
  // padding: 2px 6px;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* 右侧记录面板样式 */
.records-panel {
  min-width: 300px;
  width: 16%;
  /* 固定宽度，确保始终显示 */
  min-height: 100%;
  /* 高度至少占满屏幕 */
  background: #fff;
  border-left: 1px solid #e8e8e8;
  padding: 20px;
  overflow-y: auto;
  /* 内容超出时可滚动 */
  display: block;
  /* 强制显示 */
}

.records-panel h3 {
  margin: 0 0 20px 0;
  color: #333;
  font-size: 16px;
  font-weight: 500;
}

.empty-record {
  padding: 30px 10px;
  text-align: center;
  color: #999;
  border: 1px dashed #e8e8e8;
  border-radius: 6px;
  font-size: 14px;
  min-height: 100px;
  /* 避免面板高度塌陷 */
  display: flex;
  align-items: center;
  justify-content: center;
}

.record-item {
  display: flex;
  align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
}

.record-item.temp-record {
  opacity: 0.8;
}

.color-tag {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 12px;
}

.record-info {
  flex: 1;
}

.record-index {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.record-distance {
  font-size: 13px;
  color: #666;
}

.delete-btn {
  color: #f5222d;
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  padding: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.delete-btn:hover {
  opacity: 1;
  background: #fff1f0;
}

.reset-btn {
  width: 100%;
  margin-top: 20px;
  padding: 8px 0;
}